From: Keir Fraser Date: Fri, 18 Jun 2010 13:07:42 +0000 (+0100) Subject: libxl: give reasons for ctx init failures X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11908 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=fee4ddc4c2bb9b582955245ee3067f981cd618c9;p=xen.git libxl: give reasons for ctx init failures Signed-off-by: Tim Deegan --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index a2cd91a8f7..ebcdb3d040 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -51,12 +51,16 @@ int libxl_ctx_init(struct libxl_ctx *ctx, int version, xentoollog_logger *lg) ctx->xch = xc_interface_open(lg,lg,0); if (!ctx->xch) { + XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno, + "cannot open libxc handle"); free(ctx->alloc_ptrs); return ERROR_FAIL; } ctx->xsh = xs_daemon_open(); if (!ctx->xsh) { + XL_LOG_ERRNOVAL(ctx, XL_LOG_ERROR, errno, + "cannot connect to xenstore"); xc_interface_close(ctx->xch); free(ctx->alloc_ptrs); return ERROR_FAIL;